﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;


namespace Common
{
    public class Packetizer
    {
        public String filename;
        public long filesize;
        public const int MAX_MTU = 1300;


        

        public Packetizer(String name)
        {
            filename = name;    
            FileAttributes fa = File.GetAttributes(name);
            FileInfo fi = new FileInfo(name);
            filesize = fi.Length;
        }

        public byte[] PacketData()
        {
            byte[] output = null;
           
            FileStream fs = new FileStream(filename, FileMode.Open, FileAccess.Read);            
            output = new byte[fs.Length];
            fs.Read(output, 0, (int)fs.Length);
            fs.Close();
            return output;
        }

    }
}
